using Microsoft.VisualStudio.TextTemplating.VSHost;


using System.Runtime.InteropServices;

using Microsoft.VisualStudio.Shell;

using System.IO;
using System.Resources;

namespace Guava.ChannelTransformations
{
     [Guid("ECF4D6E6-0656-48d6-BD32-8F1EADD98D7F")]  
    public class Custom_CodeGeneration : TemplatedCodeGenerator
    {
        protected override byte[] GenerateCode(string inputFileName, string inputFileContent)
        {
            
            //load the template - looks in the dsl/bin/debug folder
        
            inputFileContent = File.ReadAllText("AppChannel.tt");
                         
            // Substitute the name of the current model file into the  template.            
            inputFileContent = inputFileContent.Replace("%MODELFILE%", inputFileName);
            

            //Now just delegate the rest of the work to the base class

            byte[] data = base.GenerateCode(inputFileName, inputFileContent);

            return data;

        }
    }

}